<!doctype html public "-//W3C//DTD HTML 4.01//EN">

<html>

   <head>
      <title>Card Catalog</title>
      <meta http-equiv="generator" content="PHP Designer 2005" />
      <style type="text/css">
        @import url(style.css);
      </style>
   </head>

   <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
    <table width='75%' height='45%' class='content'>
    <tr>

    <?php
    require ('db_connection.php');
    $materialID = $_GET['materialID'];
    
    $query = "SELECT * FROM tblcollection WHERE materialID='$materialID'";
    $result = mysql_query($query);
    while ($row = mysql_fetch_array($result))
    {
      $callNo = $row['callNo'];
      $libraryNo = $row['libraryNo'];
    }

    $query = "SELECT * FROM tblcollection WHERE callNo='$callNo' AND libraryNo='$libraryNo'";
    $result = mysql_query($query);
    while ($row = mysql_fetch_array($result))
    {
      $callNo=$row['callNo'];
      $author=$row['author'];
      $title=$row['title'];
      $publisher=$row['publisher'];
      $yearPub=$row['yearPub'];
      $placePub=$row['placePub'];
      $ISBN=$row['ISBN'];
      $noOfPage=$row['noOfPage'];
      $width=$row['width'];
      $length=$row['length'];
      $accessionNo=$row['accessionNo'];
    }


    echo "
    <td width='25%' valign='top'>
       <table>
            <tr><td>$callNo</td></tr>
            <tr><td>$yearPub</td></tr>
        </table>
    </td>
    
    <td width='75%'>
        <table cellpadding='5' valign='top' height='65%' background='id.png'>
            <tr><td>$author</td></tr>
            <tr><td>$title/ $author -- $publisher, $placePub, $yearPub</td></tr>
            <tr><td>$noOfPage. page ______ / $width x $length</td></tr>
            <tr><td>ISBN $ISBN</td></tr>
            <tr><td height='60'></td></tr>
        </table>
        <table cellpadding='5' valign='bottom' height='35%' align='right'>
            <tr><td height='60'></td></tr>
            <tr><td>$accessionNo</td></tr>
        </table>
    </td>
    "; ?>
    </tr>
    </table>
   </body>
</html>
